﻿<%@ Page Language="C#" MasterPageFile="../main.master" Inherits="VioletDevelopmentLaboratory.Net.Web.Configuration.VWebConfigManagerPage" %>

<script runat="server">
	protected void PagesDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);
	}

	
	
	
	
	
	protected void ControlsGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		ControlsDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}
	protected void ControlsDetailsView_ItemInserting(object sender, DetailsViewInsertEventArgs e)
	{
		object name_space = e.Values["Namespace"];
		e.Values.Remove("Namespace");
		e.Values.Add("Name_space", name_space);
	}
	protected void ControlsDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		ControlsGridView.SelectedIndex = -1;
		ControlsGridView.DataBind();
	}
	protected void ControlsDetailsView_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
	{
		object name_space = e.NewValues["Namespace"];
		e.NewValues.Remove("Namespace");
		e.NewValues.Add("Name_space", name_space);
	}
	protected void ControlsDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		ControlsGridView.SelectedIndex = -1;
		ControlsGridView.DataBind();
	}
	protected void ControlsDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		ControlsDetailsView.ChangeMode(DetailsViewMode.Insert);

		ControlsGridView.SelectedIndex = -1;
		ControlsGridView.DataBind();
	}

	
	
	
	
	
	protected void NamespacesGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		NamespacesDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}

	protected void NamespacesDetailsView_ItemInserting(object sender, DetailsViewInsertEventArgs e)
	{
		object name_space = e.Values["Namespace"];
		e.Values.Remove("Namespace");
		e.Values.Add("Name_space", name_space);
	}

	protected void NamespacesDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		NamespacesGridView.SelectedIndex = -1;
		NamespacesGridView.DataBind();
	}

	protected void NamespacesDetailsView_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
	{
		object name_space = e.NewValues["Namespace"];
		e.NewValues.Remove("Namespace");
		e.NewValues.Add("Name_space", name_space);
	}

	protected void NamespacesDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		NamespacesGridView.SelectedIndex = -1;
		NamespacesGridView.DataBind();
	}

	protected void NamespacesDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		NamespacesDetailsView.ChangeMode(DetailsViewMode.Insert);

		NamespacesGridView.SelectedIndex = -1;
		NamespacesGridView.DataBind();
	}

	
	
	
	
	
	protected void TagMappingsGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		TagMappingsDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}

	protected void TagMappingsDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		TagMappingsGridView.SelectedIndex = -1;
		TagMappingsGridView.DataBind();
	}

	protected void TagMappingsDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		TagMappingsGridView.SelectedIndex = -1;
		TagMappingsGridView.DataBind();
	}

	protected void TagMappingsDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		TagMappingsDetailsView.ChangeMode(DetailsViewMode.Insert);

		TagMappingsGridView.SelectedIndex = -1;
		TagMappingsGridView.DataBind();
	}
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">

	<h2>Pages</h2>

	<div>
		<asp:ObjectDataSource ID="PagesDetailsViewDataSource" runat="server" 
			SelectMethod="GetPages" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.PagesSectionManager" 
			UpdateMethod="Modify">
			<UpdateParameters>
				<asp:Parameter Name="asyncTimeout" Type="Object" />
				<asp:Parameter Name="autoEventWireup" Type="Boolean" />
				<asp:Parameter Name="buffer" Type="Boolean" />
				<asp:Parameter Name="compilationMode" Type="Object" />
				<asp:Parameter Name="enableSessionState" Type="Object" />
				<asp:Parameter Name="enableEventValidation" Type="Boolean" />
				<asp:Parameter Name="enableViewState" Type="Boolean" />
				<asp:Parameter Name="enableViewStateMac" Type="Boolean" />
				<asp:Parameter Name="maintainScrollPositionOnPostBack" Type="Boolean" />
				<asp:Parameter Name="masterPageFile" Type="String" />
				<asp:Parameter Name="maxPageStateFieldLength" Type="Int32" />
				<asp:Parameter Name="pageBaseType" Type="String" />
				<asp:Parameter Name="pageParserFilterType" Type="String" />
				<asp:Parameter Name="styleSheetTheme" Type="String" />
				<asp:Parameter Name="theme" Type="String" />
				<asp:Parameter Name="userControlBaseType" Type="String" />
				<asp:Parameter Name="validateRequest" Type="Boolean" />
				<asp:Parameter Name="viewStateEncryptionMode" Type="Object" />
			</UpdateParameters>
		</asp:ObjectDataSource>
		<fieldset>
			<legend>pages</legend>
			<asp:DetailsView ID="PagesDetailsView" runat="server" DefaultMode="Edit" 
				CellPadding="5" AutoGenerateRows="False" 
				DataSourceID="PagesDetailsViewDataSource" onitemupdated="PagesDetailsView_ItemUpdated">
				<Fields>
					<asp:BoundField DataField="AsyncTimeout" HeaderText="AsyncTimeout" 
						SortExpression="AsyncTimeout" />
					<asp:CheckBoxField DataField="AutoEventWireup" HeaderText="AutoEventWireup" 
						SortExpression="AutoEventWireup" />
					<asp:CheckBoxField DataField="Buffer" HeaderText="Buffer" 
						SortExpression="Buffer" />
					<asp:TemplateField HeaderText="CompilationMode" 
						SortExpression="CompilationMode">
						<EditItemTemplate>
							<asp:DropDownList ID="CompilationModeDropDownList" runat="server" 
								SelectedValue='<%# Bind("CompilationMode") %>'>
								<asp:ListItem>Always</asp:ListItem>
								<asp:ListItem>Auto</asp:ListItem>
								<asp:ListItem>Never</asp:ListItem>
							</asp:DropDownList>
						</EditItemTemplate>
					</asp:TemplateField>
					<asp:CheckBoxField DataField="EnableEventValidation" 
						HeaderText="EnableEventValidation" SortExpression="EnableEventValidation" />
					<asp:TemplateField HeaderText="EnableSessionState" 
						SortExpression="EnableSessionState">
						<EditItemTemplate>
							<asp:DropDownList ID="SessionStateDropDownList" runat="server" 
								SelectedValue='<%# Bind("EnableSessionState") %>'>
								<asp:ListItem>False</asp:ListItem>
								<asp:ListItem>ReadOnly</asp:ListItem>
								<asp:ListItem>True</asp:ListItem>
							</asp:DropDownList>
						</EditItemTemplate>
					</asp:TemplateField>
					<asp:CheckBoxField DataField="EnableViewState" HeaderText="EnableViewState" 
						SortExpression="EnableViewState" />
					<asp:CheckBoxField DataField="EnableViewStateMac" 
						HeaderText="EnableViewStateMac" SortExpression="EnableViewStateMac" />
					<asp:CheckBoxField DataField="MaintainScrollPositionOnPostBack" 
						HeaderText="MaintainScrollPositionOnPostBack" 
						SortExpression="MaintainScrollPositionOnPostBack" />
					<asp:BoundField DataField="MasterPageFile" HeaderText="MasterPageFile" 
						SortExpression="MasterPageFile" />
					<asp:BoundField DataField="MaxPageStateFieldLength" 
						HeaderText="MaxPageStateFieldLength" SortExpression="MaxPageStateFieldLength" />
					<asp:BoundField DataField="PageBaseType" HeaderText="PageBaseType" 
						SortExpression="PageBaseType" />
					<asp:BoundField DataField="PageParserFilterType" 
						HeaderText="PageParserFilterType" SortExpression="PageParserFilterType" />
					<asp:BoundField DataField="StyleSheetTheme" HeaderText="StyleSheetTheme" 
						SortExpression="StyleSheetTheme" />
					<asp:BoundField DataField="Theme" HeaderText="Theme" SortExpression="Theme" />
					<asp:BoundField DataField="UserControlBaseType" 
						HeaderText="UserControlBaseType" SortExpression="UserControlBaseType" />
					<asp:CheckBoxField DataField="ValidateRequest" HeaderText="ValidateRequest" 
						SortExpression="ValidateRequest" />
					<asp:TemplateField HeaderText="ViewStateEncryptionMode" 
						SortExpression="ViewStateEncryptionMode">
						<EditItemTemplate>
							<asp:DropDownList ID="ViewStateEncrytionModeDropDownList" runat="server" 
								SelectedValue='<%# Bind("ViewStateEncryptionMode") %>'>
								<asp:ListItem>Always</asp:ListItem>
								<asp:ListItem>Auto</asp:ListItem>
								<asp:ListItem>Never</asp:ListItem>
							</asp:DropDownList>
						</EditItemTemplate>
					</asp:TemplateField>
					<asp:CommandField ButtonType="Button" ShowCancelButton="False" 
						ShowEditButton="True" />
				</Fields>
			</asp:DetailsView>
		</fieldset>
	</div>

	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="ControlsDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveControl" InsertMethod="AddControl" 
			SelectMethod="GetControl" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.PagesSectionManager" 
			UpdateMethod="ModifyControl">
			<DeleteParameters>
				<asp:ControlParameter ControlID="ControlsGridView" Name="index" 
					PropertyName="SelectedIndex" Type="Int32" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:ControlParameter ControlID="ControlsGridView" Name="index" 
					PropertyName="SelectedIndex" Type="Int32" />
				<asp:Parameter Name="tagPrefix" Type="String" />
				<asp:Parameter Name="name_space" Type="String" />
				<asp:Parameter Name="assembly" Type="String" />
				<asp:Parameter Name="tagName" Type="String" />
				<asp:Parameter Name="source" Type="String" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="ControlsGridView" Name="index" 
					PropertyName="SelectedIndex" Type="Int32" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="tagPrefix" Type="String" />
				<asp:Parameter Name="name_space" Type="String" />
				<asp:Parameter Name="assembly" Type="String" />
				<asp:Parameter Name="tagName" Type="String" />
				<asp:Parameter Name="source" Type="String" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="ControlsGridViewDataSource" runat="server" 
			SelectMethod="GetControls" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.PagesSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>controls</legend>
			<asp:DetailsView ID="ControlsDetailsView" runat="server" CellPadding="5" 
							DefaultMode="Insert" AutoGenerateRows="False" 
							DataSourceID="ControlsDetailsViewDataSource" onitemupdating="ControlsDetailsView_ItemUpdating" 
							oniteminserting="ControlsDetailsView_ItemInserting" 
							oniteminserted="ControlsDetailsView_ItemInserted" 
							onitemupdated="ControlsDetailsView_ItemUpdated" onitemdeleted="ControlsDetailsView_ItemDeleted">
				<Fields>
					<asp:BoundField DataField="TagPrefix" HeaderText="TagPrefix" 
						SortExpression="TagPrefix" />
					<asp:BoundField DataField="Assembly" HeaderText="Assembly" 
						SortExpression="Assembly" />
					<asp:BoundField DataField="Namespace" HeaderText="Namespace" 
						SortExpression="Namespace" />
					<asp:BoundField DataField="TagName" HeaderText="TagName" 
						SortExpression="TagName" />
					<asp:BoundField DataField="Source" HeaderText="Source" 
						SortExpression="Source" />
					<asp:CommandField ButtonType="Button" ShowDeleteButton="True" 
						ShowEditButton="True" ShowInsertButton="True" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="ControlsGridView" runat="server" CellPadding="5" 
				AutoGenerateColumns="False" DataSourceID="ControlsGridViewDataSource" 
							onselectedindexchanging="ControlsGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="TagPrefix" HeaderText="TagPrefix" 
						SortExpression="TagPrefix" />
					<asp:BoundField DataField="Assembly" HeaderText="Assembly" 
						SortExpression="Assembly" />
					<asp:BoundField DataField="Namespace" HeaderText="Namespace" 
						SortExpression="Namespace" />
					<asp:BoundField DataField="TagName" HeaderText="TagName" 
						SortExpression="TagName" />
					<asp:BoundField DataField="Source" HeaderText="Source" 
						SortExpression="Source" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>

	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="NamespacesDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveNamespace" InsertMethod="AddNamespace" 
			SelectMethod="GetNamespace" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.PagesSectionManager" 
			UpdateMethod="ModifyNamespace">
			<DeleteParameters>
				<asp:ControlParameter ControlID="NamespacesGridView" Name="index" 
					PropertyName="SelectedIndex" Type="Int32" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:ControlParameter ControlID="NamespacesGridView" Name="index" 
					PropertyName="SelectedIndex" Type="Int32" />
				<asp:Parameter Name="name_space" Type="String" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="NamespacesGridView" Name="index" 
					PropertyName="SelectedIndex" Type="Int32" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="name_space" Type="String" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="NamespacesGridViewDataSource" runat="server" 
			SelectMethod="GetNamespaces" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.PagesSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>namespaces</legend>
			<asp:DetailsView ID="NamespacesDetailsView" runat="server" CellPadding="5" 
				DefaultMode="Insert" AutoGenerateRows="False" DataSourceID="NamespacesDetailsViewDataSource" 
							oniteminserting="NamespacesDetailsView_ItemInserting" 
							oniteminserted="NamespacesDetailsView_ItemInserted" 
							onitemupdating="NamespacesDetailsView_ItemUpdating" 
							onitemupdated="NamespacesDetailsView_ItemUpdated" 
							onitemdeleted="NamespacesDetailsView_ItemDeleted">
				<Fields>
					<asp:BoundField DataField="Namespace" HeaderText="Namespace" 
						SortExpression="Namespace" />
					<asp:CommandField ButtonType="Button" ShowDeleteButton="True" 
						ShowEditButton="True" ShowInsertButton="True" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="NamespacesGridView" runat="server" 
				AutoGenerateColumns="False" CellPadding="5" 
				DataSourceID="NamespacesGridViewDataSource" 
							onselectedindexchanging="NamespacesGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="Namespace" HeaderText="Namespace" 
						SortExpression="Namespace" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>

	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="TagMappingsDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveTagMap" InsertMethod="AddTagMap" SelectMethod="GetTagMap" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.PagesSectionManager" 
			UpdateMethod="ModifyTagMap">
			<DeleteParameters>
				<asp:Parameter Name="index" Type="Int32" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:Parameter Name="index" Type="Int32" />
				<asp:Parameter Name="tagType" Type="String" />
				<asp:Parameter Name="mappedTagType" Type="String" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="TagMappingsGridView" Name="index" 
					PropertyName="SelectedIndex" Type="Int32" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="tagType" Type="String" />
				<asp:Parameter Name="mappedTagType" Type="String" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="TagMappingsGridViewDataSource" runat="server" 
			SelectMethod="GetTagMaps" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.PagesSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>tagMappings</legend>
			<asp:DetailsView ID="TagMappingsDetailsView" runat="server" CellPadding="5" 
				DefaultMode="Insert" AutoGenerateRows="False" 
				DataSourceID="TagMappingsDetailsViewDataSource" 
				oniteminserted="TagMappingsDetailsView_ItemInserted" 
				onitemupdated="TagMappingsDetailsView_ItemUpdated" 
				onitemdeleted="TagMappingsDetailsView_ItemDeleted">
				<Fields>
					<asp:BoundField DataField="TagType" HeaderText="TagType" 
						SortExpression="TagType" />
					<asp:BoundField DataField="MappedTagType" HeaderText="MappedTagType" 
						SortExpression="MappedTagType" />
					<asp:CommandField ButtonType="Button" ShowDeleteButton="True" 
						ShowEditButton="True" ShowInsertButton="True" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="TagMappingsGridView" runat="server" 
				AutoGenerateColumns="False" CellPadding="5" 
				DataSourceID="TagMappingsGridViewDataSource" 
				onselectedindexchanging="TagMappingsGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="TagType" HeaderText="TagType" 
						SortExpression="TagType" />
					<asp:BoundField DataField="MappedTagType" HeaderText="MappedTagType" 
						SortExpression="MappedTagType" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>
</asp:Content>